package com.qmx.qmxapp.activity;

import android.os.Bundle;
import android.widget.TextView;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import com.qmx.qmxapp.R;
import com.qmx.qmxapp.base.BaseActivity;
import com.qmx.qmxapp.callback.DialogCallback;
import com.qmx.qmxapp.constant.AppConstant;
import com.qmx.qmxapp.constant.ComParamContact;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MineChangePasswordActivity extends BaseActivity {
    private TextView tip_content;

    @BindView(R.id.tip_save)
    TextView tip_save;
    @BindView(R.id.ed_input_current_password)
    TextView ed_input_current_password;
    @BindView(R.id.ed_input_password)
    TextView ed_input_password;
    @BindView(R.id.ed_input_second_password)
    TextView ed_input_second_password;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_mine_change_password);
        ButterKnife.bind(this);
        tip_content = findViewById(R.id.tip_content);
        tip_content.setText("修改密码");
    }

    @OnClick(R.id.tip_save)
    public void onClick() {
        doPwdChange();
    }

    private void doPwdChange() {
        OkGo.<String>post(AppConstant.Url + ComParamContact.Logout.PATH)
                .params(ComParamContact.Logout.TOKEN, "")
                .execute(new DialogCallback<String>(this) {

                    @Override
                    public void onSuccess(Response<String> response) {
                        showToast(response.body());
//                            handleResponse(response);
                    }

                    @Override
                    public void onError(Response<String> response) {
                        showToast("接口有问题");
//                            handleError(response);
                    }
                });
    }

}
